/**
 * Copyright 2025 Adobe. All rights reserved.
 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License. You may obtain a copy
 * of the License at http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under
 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
 * OF ANY KIND, either express or implied. See the License for the specific language
 * governing permissions and limitations under the License.
 */

:host {
    display: block;
}

.spectrum-Divider {
    --spectrum-divider-background-color: var(--spectrum-gray-200);
    --spectrum-divider-thickness: var(--spectrum-divider-thickness-medium);
    --spectrum-divider-inline-minimum-size: var(
        --spectrum-divider-horizontal-minimum-width
    );
    --spectrum-divider-block-minimum-size: var(
        --spectrum-divider-vertical-minimum-height
    );
}

.spectrum-Divider--sizeS {
    --spectrum-divider-thickness: var(--spectrum-divider-thickness-small);
}

.spectrum-Divider--sizeL {
    --spectrum-divider-thickness: var(--spectrum-divider-thickness-large);
    --spectrum-divider-background-color: var(--spectrum-gray-800);
}

/* static white variant colors */
.spectrum-Divider--staticWhite {
    --spectrum-divider-background-color: var(--spectrum-transparent-white-200);
}

.spectrum-Divider--staticWhite.spectrum-Divider--sizeL {
    --spectrum-divider-background-color: var(--spectrum-transparent-white-800);
}

/* static black variant colors */
.spectrum-Divider--staticBlack {
    --spectrum-divider-background-color: var(--spectrum-transparent-black-200);
}

.spectrum-Divider--staticBlack.spectrum-Divider--sizeL {
    --spectrum-divider-background-color: var(--spectrum-transparent-black-800);
}

.spectrum-Divider {
    block-size: var(--spectrum-divider-thickness);
    inline-size: 100%;

    /* Show the overflow for hr in Edge and IE. */
    overflow: visible;
    border: none;
    border-width: var(--spectrum-divider-thickness);
    border-radius: var(--spectrum-divider-thickness);
    background-color: var(
        --highcontrast-divider-background-color,
        var(--spectrum-divider-background-color)
    );
}

.spectrum-Divider:not(.spectrum-Divider--vertical) {
    min-inline-size: var(--spectrum-divider-inline-minimum-size);
}

/* vertical dividers */
.spectrum-Divider--vertical {
    inline-size: var(--spectrum-divider-thickness);
    min-block-size: var(--spectrum-divider-block-minimum-size);
    margin-block: 0;
    block-size: 100%;
    align-self: flex-start;
}

/* windows high contrast mode */
@media (forced-colors: active) {
    .spectrum-Divider {
        --highcontrast-divider-background-color: CanvasText;
    }
}
